﻿<%@ WebHandler Language="C#" Class="ToPostPriceEdit" %>
using System.Web.SessionState;
using System;
using System.Web;
using BLL;
public class ToPostPriceEdit : IHttpHandler, IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";

        if (context.Session["uid"] == null)
        {
            context.Response.Write("未登录");
        }
        string sep = context.Request.Params["sep"].ToString().Trim();
        string no = context.Request.Params["pno"].ToString().Trim();
        string weight = context.Request.Params["pweight"].ToString().Trim();
        string paytype = context.Request.Params["ppaytype"].ToString().Trim();
        string weightpay = context.Request.Params["pweightpay"].ToString().Trim();
        string dianfu = context.Request.Params["pdianfu"].ToString().Trim();
        string daigou = context.Request.Params["pdaigou"].ToString().Trim();
        string baozhuang = context.Request.Params["pbaozhuang"].ToString().Trim();
        string guansui = context.Request.Params["pguansui"].ToString().Trim();
        string baoxian = context.Request.Params["pbaoxian"].ToString().Trim();
        string qita = context.Request.Params["pqita"].ToString().Trim();
        string youhui = context.Request.Params["pyouhui"].ToString().Trim();

        string payweight = context.Request.Params["ppayweight"].ToString().Trim();
        WayBillService wb = new WayBillService();

        int num = 0;

        if (wb.ToUpPrice(sep, no, weight, paytype, weightpay, dianfu, daigou, baozhuang, guansui, baoxian, qita, youhui, payweight, ref  num))
        {

            context.Response.Write("编辑成功！已经编辑：" + num + "条数据！");

        }
        else
        {

            context.Response.Write("err");
        }


    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}